import React, { useEffect, useState } from 'react'
import { View, Text ,Image} from '@tarojs/components'
import './index.less'
export default function Productitem(props) {
  console.log(props,12345)
  return (
    <View className='box'>
      <View className='top'>
        <View className='top_img'>
          <Image src={props.obj.pic||''}mode='scaleToFill'></Image>
          </View>
        <View className='top_body'>
          <View className='body_title'>
            {props.obj.name||''}
          </View>
          <View className='body_num'>
            <View>
          <Text>{props.obj.num||''}万     
          </Text>
          </View>
            人气值
            </View>
        </View>
        <View className='bottom_wrap'>
        <View className='bottom'>
          <View className='bottom_left btn' onClick={()=>props.goto(props.obj.id)}>查看详情</View>
          <View className='bottom_right btn' onClick={()=>props.collect(props.obj)}>收藏一下</View>
          </View>
      </View>
      </View>
    </View>
  )
}
